package com.appwoo.txtws.component;

import android.app.Activity;
import android.view.View;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;

public class LockLayer2
{
  private static LockLayer2 mLockLayer;
  private boolean isLocked;
  private Activity mActivty;
  private View mLockView;
  private WindowManager.LayoutParams mLockViewLayoutParams;
  private WindowManager mWindowManager;

  private LockLayer2(Activity paramActivity)
  {
    this.mActivty = paramActivity;
    init();
  }

  public static LockLayer2 getInstance(Activity paramActivity)
  {
    try
    {
      if (mLockLayer == null)
        mLockLayer = new LockLayer2(paramActivity);
      LockLayer2 localLockLayer2 = mLockLayer;
      return localLockLayer2;
    }
    finally
    {
    }
  }

  private void init()
  {
    this.isLocked = false;
    this.mWindowManager = this.mActivty.getWindowManager();
    this.mLockViewLayoutParams = new WindowManager.LayoutParams();
    this.mLockViewLayoutParams.width = -1;
    this.mLockViewLayoutParams.height = -1;
    this.mLockViewLayoutParams.type = 2010;
    this.mLockViewLayoutParams.flags = 1280;
  }

  public void lock()
  {
    try
    {
      if ((this.mLockView != null) && (!this.isLocked))
        this.mWindowManager.addView(this.mLockView, this.mLockViewLayoutParams);
      this.isLocked = true;
      return;
    }
    finally
    {
    }
  }

  public void removeV()
  {
    try
    {
      if ((this.mWindowManager != null) && (this.mLockView != null))
      {
        this.mWindowManager.removeView(this.mLockView);
        this.mLockView = null;
      }
      return;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public void setLockView(View paramView)
  {
    try
    {
      this.mLockView = paramView;
      return;
    }
    finally
    {
      localObject = finally;
      throw localObject;
    }
  }

  public void unlock()
  {
    try
    {
      if ((this.mWindowManager != null) && (this.isLocked))
      {
        if (this.mLockView != null)
          this.mWindowManager.removeView(this.mLockView);
        mLockLayer = null;
      }
      this.isLocked = false;
      return;
    }
    finally
    {
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.component.LockLayer2
 * JD-Core Version:    0.6.2
 */